﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<VietThuongLMS.ViewModels.ChiNhanhViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div class="wrap_headline">
        <div class="headline">
        </div>
    </div>
    <div class="wrap_cont_nav">
        <div class="cont_nav">
            <a href='<%=ResolveUrl("~/")%>'><%=Resources.Global.trang_chu%></a>&nbsp;/&nbsp;<%=Resources.Global.lien_he%>
        </div>
    </div>
    <div class="container">
        <section id="middle">
					<div class="middle_inner">
<!-- __________________________________________________ Start Content -->

						<div class="content_wrap sidebar_left">
                        <section id="content" class="fr">
                        <div class="entry">
                            <div class="resizable_block">
                                <%if (@Model != null)
                                  {
                                      foreach (VietThuongLMS.ChiNhanh cn in @Model.List)
                                      { %>
									      <img id="chiNhanh<%=@cn.ID%>" alt="<%=@cn.TenChiNhanh%>" style="width:630px; height:400px;" src='<%=ResolveUrl("~/Images/ChiNhanh/")%><%=@cn.ImgDiaDiem %>' />
                                    <%}
                                  } %>
                                  </div>
                                    <br /><br /><br />
									<h2><%=Resources.Global.gui_thu_cho_chung_toi%></h2>
									<div class="cmsms-form-builder">
										<div class="box success_box" style="display:none;">
											<table>
												<tr>
													<td>&nbsp;</td>
													<td>Thank You!<br>Your message has been sent successfully.</td>
												</tr>
											</table>
										</div>
										<form action='<%=ResolveUrl("~/Home/LienHeSumit")%>' method="post" id="contactform">
											<p><%=Resources.Global.dau%> <span class="color2">*</span> <%=Resources.Global.bat_buoc%></p>
											<div class="form_info cmsms_input">
												<label for="contact_name"><%=Resources.Global.ten_cua_ban%> <span class="color2">*</span></label>
												<input type="text" name="contact_name" id="contact_name" value="" size="22" tabindex="3" class="validate[required,minSize[3],maxSize[100],custom[onlyLetterSp]]"/>
                                                <label id="err_contact_name" class="err_mess" style="display:none"><%=Resources.Global.req_ho_ten%></label>
											</div>
											<div class="cl"></div>
											<div class="form_info cmsms_input">
												<label for="contact_email">Email <span class="color2">*</span></label>
												<input type="text" name="contact_email" id="contact_email" value="" size="22" tabindex="4" class="validate[required,custom[email]]" />
											    <label id="err_contact_email" class="err_mess" style="display:none"><%=Resources.Global.req_email%></label>
                                            </div>
											<div class="cl"></div>
											<div class="form_info cmsms_input">
												<label for="contact_url"><%=Resources.Global.dia_chi%></label>
												<input type="text" name="contact_address" id="contact_address" value="" size="22" tabindex="5" class="validate[custom[url]]" />
											</div>
											<div class="cl"></div>
											<div class="form_info cmsms_input">
												<label for="contact_url"><%=Resources.Global.dien_thoai%></label>
												<input type="text" name="contact_phone" id="contact_phone" value="" size="22" tabindex="5" class="validate[custom[url]]" />
											</div>
											<div class="cl"></div>
											<div class="form_info cmsms_textarea">
												<label for="contact_message"><%=Resources.Global.cau_hoi_cua_ban%> <span class="color2">*</span></label>
												<textarea name="contact_message" id="contact_message" cols="28" rows="6" tabindex="7" class="validate[required,minSize[3]]" ></textarea>
											    <label id="err_contact_message" class="err_mess" style="display:none"><%=Resources.Global.req_noi_dung_cau_hoi%></label>
                                            </div>
											<div class="cl"></div>
											<div>
												<input type="submit" class="button" value="<%=Resources.Global.gui%>" onclick="return validateForm()" id="contact_form_formsend" tabindex="8" />
												<div class="loading"></div>
											</div>
										</form>
									</div>
                        </div>
                        </section>

                        <section id="sidebar">
                            <div class="one_first">
                                <aside class="widget widget_custom_advertising_entries">
                                    <h2 class="widgettitle"><%=Resources.Global.chi_nhanh%></h2>
                                <ul>
                                <% 
                                    int i = 1;
                                    if (@Model != null && @Model.List.Count > 0)
                                    {
                                        foreach (VietThuongLMS.ChiNhanh @ChiNhanh in @Model.List)
                                        {%>
	                                <li <%if(i==1){ %> class="current"<%} i++; %>>
		                                <a href="javascript:chonChiNhanh('chiNhanh<%=@ChiNhanh.ID%>')">
			                                <%=@ChiNhanh.TenChiNhanh%>
		                                </a><br />
                                        <%=@ChiNhanh.DiaChi%>
	                                </li>
                                    <%} %>
                                </ul>
                                    <%}%>
                            </aside>
                        </div>
<!-- __________________________________________________ Finish Sidebar -->	
					</div>
				</section>
                <script type="text/javascript">
                    function chonChiNhanh(id) {
                        <%foreach (VietThuongLMS.ChiNhanh @ChiNhanh in @Model.List)
                        { %>
                            $("#chiNhanh" + <%=@ChiNhanh.ID %>).hide();
                        <%} %>
                        $("#" + id).show();
                    }

                    function validateForm() {
                        var val = true;
                        if($("#contact_message").val() == "") {
                            $("#err_contact_message").show();
                            val = false;
                            $("#contact_message").focus();
                        }
                        else {
                            $("#err_contact_message").hide();
                        }

                        if($("#contact_email").val() == "") {
                            $("#err_contact_email").show();
                            val = false;
                            $("#contact_email").focus();
                        }
                        else {
                            $("#err_contact_email").hide();
                        }

                        if($("#contact_name").val() == "") {
                            $("#err_contact_name").show();
                            val = false;
                            $("#contact_name").focus();
                        }
                        else {
                            $("#err_contact_name").hide();
                        }
                        return val;
                    }
                </script>

                <style type="text/css">
                    .err_mess
                    {
                        color: Red;
                    }
                </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <title><%=Resources.Global.title%> - <%=Resources.Global.lien_he%></title>
</asp:Content>
